<!--
  Contains resources for the DiagramNode control. Instead of specifying every possible 
  node combination as a resource, only four control templates are specified: female, 
  male, primary female, and primary male. Then different brushes are used depending 
  on the node state. For example: sibling brush, related deceased brush, spouse brush.
-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Microsoft.FamilyShow"
    >

  <!-- Converter for formatting dates to short date format -->
  <local:DateFormattingConverter x:Key="DateFormattingConverter"/>

  <!-- Converter for avatar -->
  <local:ComposingConverter x:Key="ComposingConverter">
    <local:ComposingConverter.Converters>
      <local:NotConverter/>
      <local:BoolToVisibilityConverter/>
    </local:ComposingConverter.Converters>
  </local:ComposingConverter>

  <!-- Node colors -->
  <Color x:Key="PrimaryColor">#fff06423</Color>
  <Color x:Key="PrimaryHoverColor">#ffff8443</Color>
  <Color x:Key="RelatedColor">#fff06423</Color>
  <Color x:Key="RelatedHoverColor">#ffff8443</Color>
  <Color x:Key="SpouseColor">#ff6797c8</Color>
  <Color x:Key="SpouseHoverColor">#ff87b7e8</Color>
  <Color x:Key="SiblingColor">#fff09822</Color>
  <Color x:Key="SiblingHoverColor">#ffffb842</Color>
  <Color x:Key="SiblingLeftColor">#ff6797c8</Color>
  <Color x:Key="SiblingLeftHoverColor">#ff87b7e8</Color>
  <Color x:Key="SiblingRightColor">#fff09822</Color>
  <Color x:Key="SiblingRightHoverColor">#ffffb842</Color>

  <!-- Female primary brushes -->
  <SolidColorBrush x:Key="FemalePrimaryLivingFill" Color="{StaticResource PrimaryColor}" />
  <SolidColorBrush x:Key="FemalePrimaryLivingHoverFill" Color="{StaticResource PrimaryHoverColor}" />
  <SolidColorBrush x:Key="FemalePrimaryDeceasedStroke" Color="{StaticResource PrimaryColor}" />
  <SolidColorBrush x:Key="FemalePrimaryDeceasedHoverFill" Color="{StaticResource PrimaryHoverColor}" Opacity="0.50" />

  <!-- Female related brushes -->
  <SolidColorBrush x:Key="FemaleRelatedLivingFill" Color="{StaticResource RelatedColor}" />
  <SolidColorBrush x:Key="FemaleRelatedLivingHoverFill" Color="{StaticResource RelatedHoverColor}" />
  <SolidColorBrush x:Key="FemaleRelatedDeceasedStroke" Color="{StaticResource RelatedColor}" />
  <SolidColorBrush x:Key="FemaleRelatedDeceasedHoverFill" Color="{StaticResource RelatedHoverColor}" Opacity="0.50" />

  <!-- Female spouse brushes -->
  <SolidColorBrush x:Key="FemaleSpouseLivingFill" Color="{StaticResource SpouseColor}" />
  <SolidColorBrush x:Key="FemaleSpouseLivingHoverFill" Color="{StaticResource SpouseHoverColor}" />
  <SolidColorBrush x:Key="FemaleSpouseDeceasedStroke" Color="{StaticResource SpouseColor}" />
  <SolidColorBrush x:Key="FemaleSpouseDeceasedHoverFill" Color="{StaticResource SpouseHoverColor}" Opacity="0.50" />

  <!-- Female sibling brushes -->
  <SolidColorBrush x:Key="FemaleSiblingLivingFill" Color="{StaticResource SiblingColor}" />
  <SolidColorBrush x:Key="FemaleSiblingLivingHoverFill" Color="{StaticResource SiblingHoverColor}" />
  <SolidColorBrush x:Key="FemaleSiblingDeceasedStroke" Color="{StaticResource SiblingColor}" />
  <SolidColorBrush x:Key="FemaleSiblingDeceasedHoverFill" Color="{StaticResource SiblingHoverColor}" Opacity="0.50" />

  <!-- Female sibling left brushes -->
  <LinearGradientBrush x:Key="FemaleSiblingLeftLivingFill" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.019"/>
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.51"/>
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.5"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="FemaleSiblingLeftLivingHoverFill" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.019"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.51"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.5"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="FemaleSiblingLeftDeceasedStroke" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.486"/>
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.514"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="FemaleSiblingLeftDeceasedHoverFill" EndPoint="1,0.5" StartPoint="0,0.5" Opacity="0.50">
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.019"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.51"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.5"/>
  </LinearGradientBrush>

  <!-- Female sibling right brushes -->
  <LinearGradientBrush x:Key="FemaleSiblingRightLivingFill" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.019"/>
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.51"/>
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.5"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="FemaleSiblingRightLivingHoverFill" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.019"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.51"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.5"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="FemaleSiblingRightDeceasedStroke" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.486"/>
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.514"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="FemaleSiblingRightDeceasedHoverFill" EndPoint="1,0.5" StartPoint="0,0.5" Opacity="0.50">
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.019"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.51"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.5"/>
  </LinearGradientBrush>

  <!-- Male primary brushes -->
  <SolidColorBrush x:Key="MalePrimaryLivingFill" Color="{StaticResource RelatedColor}" />
  <SolidColorBrush x:Key="MalePrimaryLivingHoverFill" Color="{StaticResource RelatedHoverColor}" />
  <SolidColorBrush x:Key="MalePrimaryDeceasedStroke" Color="{StaticResource RelatedColor}" />
  <SolidColorBrush x:Key="MalePrimaryDeceasedHoverFill" Color="{StaticResource RelatedHoverColor}" Opacity="0.50" />

  <!-- Male related brushes -->
  <SolidColorBrush x:Key="MaleRelatedLivingFill" Color="{StaticResource RelatedColor}" />
  <SolidColorBrush x:Key="MaleRelatedLivingHoverFill" Color="{StaticResource RelatedHoverColor}" />
  <SolidColorBrush x:Key="MaleRelatedDeceasedStroke" Color="{StaticResource RelatedColor}" />
  <SolidColorBrush x:Key="MaleRelatedDeceasedHoverFill" Color="{StaticResource RelatedHoverColor}" Opacity="0.50" />

  <!-- Male spouse brushes -->
  <SolidColorBrush x:Key="MaleSpouseLivingFill" Color="{StaticResource SpouseColor}" />
  <SolidColorBrush x:Key="MaleSpouseLivingHoverFill" Color="{StaticResource SpouseHoverColor}" />
  <SolidColorBrush x:Key="MaleSpouseDeceasedStroke" Color="{StaticResource SpouseColor}" />
  <SolidColorBrush x:Key="MaleSpouseDeceasedHoverFill" Color="{StaticResource SpouseHoverColor}" Opacity="0.50" />

  <!-- Male sibling brushes -->
  <SolidColorBrush x:Key="MaleSiblingLivingFill" Color="{StaticResource SiblingColor}" />
  <SolidColorBrush x:Key="MaleSiblingLivingHoverFill" Color="{StaticResource SiblingHoverColor}" />
  <SolidColorBrush x:Key="MaleSiblingDeceasedStroke" Color="{StaticResource SiblingColor}" />
  <SolidColorBrush x:Key="MaleSiblingDeceasedHoverFill" Color="{StaticResource SiblingHoverColor}" Opacity="0.50" />

  <!-- Male sibling left brushes -->
  <LinearGradientBrush x:Key="MaleSiblingLeftLivingFill" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0"/>
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="1"/>
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.505"/>
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.5"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MaleSiblingLeftLivingHoverFill" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="1"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.505"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.5"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MaleSiblingLeftDeceasedStroke" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.481"/>
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.51"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MaleSiblingLeftDeceasedHoverFill" EndPoint="1,0.5" StartPoint="0,0.5" Opacity="0.50">
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="1"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.505"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.5"/>
  </LinearGradientBrush>

  <!-- Male sibling right brushes -->
  <LinearGradientBrush x:Key="MaleSiblingRightLivingFill" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0"/>
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="1"/>
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.505"/>
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.5"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MaleSiblingRightLivingHoverFill" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="1"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.505"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.5"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MaleSiblingRightDeceasedStroke" EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="{StaticResource SiblingRightColor}" Offset="0.481"/>
    <GradientStop Color="{StaticResource SiblingLeftColor}" Offset="0.51"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MaleSiblingRightDeceasedHoverFill" EndPoint="1,0.5" StartPoint="0,0.5" Opacity="0.50">
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="1"/>
    <GradientStop Color="{StaticResource SiblingLeftHoverColor}" Offset="0.505"/>
    <GradientStop Color="{StaticResource SiblingRightHoverColor}" Offset="0.5"/>
  </LinearGradientBrush>


  <!-- Spouse group indicator spouse -->
  <SolidColorBrush x:Key="SpouseGroupFill" Color="{StaticResource SpouseColor}" />
  <LinearGradientBrush x:Key="SpouseGroupStroke"  EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#00000000" Offset="0.043"/>
    <GradientStop Color="{StaticResource SpouseColor}" Offset="0.524"/>
    <GradientStop Color="#00000000" Offset="0.519"/>
  </LinearGradientBrush>

  <!-- Sibling group indicator spouse -->
  <SolidColorBrush x:Key="SiblingGroupFill" Color="{StaticResource SiblingColor}" />
  <LinearGradientBrush x:Key="SiblingGroupStroke"  EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#00000000" Offset="0.043"/>
    <GradientStop Color="{StaticResource SiblingColor}" Offset="0.524"/>
    <GradientStop Color="#00000000" Offset="0.519"/>
  </LinearGradientBrush>

  <!-- Sibling left group indicator spouse -->
  <SolidColorBrush x:Key="SiblingLeftGroupFill" Color="{StaticResource SiblingColor}" />
  <LinearGradientBrush x:Key="SiblingLeftGroupStroke"  EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#00000000" Offset="0.043"/>
    <GradientStop Color="{StaticResource SiblingColor}" Offset="0.524"/>
    <GradientStop Color="#00000000" Offset="0.519"/>
  </LinearGradientBrush>

  <!-- Sibling right group indicator spouse -->
  <SolidColorBrush x:Key="SiblingRightGroupFill" Color="{StaticResource SiblingColor}" />
  <LinearGradientBrush x:Key="SiblingRightGroupStroke"  EndPoint="1,0.5" StartPoint="0,0.5">
    <GradientStop Color="#00000000" Offset="0.043"/>
    <GradientStop Color="{StaticResource SiblingColor}" Offset="0.524"/>
    <GradientStop Color="#00000000" Offset="0.519"/>
  </LinearGradientBrush>

  <!-- ToolTip -->
  <Style TargetType="ToolTip">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="HasDropShadow" Value="True"/>
    <Setter Property="Foreground" Value="#FFFFFFFF"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ToolTip">
          <Border Name="Border" Background="#FF202020" BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,1" CornerRadius="10,10,10,10">
            <StackPanel>
              <Border BorderBrush="#02747474" Background="#02000000" HorizontalAlignment="Center" Margin="10,5,10,0" VerticalAlignment="Top" BorderThickness="1,1,1,1" x:Name="AvatarPhotoBorder">
                <Border.BitmapEffect>
                  <DropShadowBitmapEffect ShadowDepth="7" Softness="0.75"/>
                </Border.BitmapEffect>
                <Image x:Name="Avatar" Source="{Binding Path=Person.Avatar, Mode=OneWay}" Stretch="Uniform" VerticalAlignment="Top" MaxWidth="90" MaxHeight="85" HorizontalAlignment="Left" StretchDirection="DownOnly"/>
              </Border>
              <Border x:Name="NoPhotoBorder" Visibility="{Binding Path=Person.HasAvatar, Converter={StaticResource ComposingConverter}, Mode=Default}"  BorderBrush="#FFFFFFFF" Background="#02FFFFFF" Margin="10,5,10,0">
                <Rectangle Fill="{DynamicResource NoPhotoBrush}" Stroke="{x:Null}" Width="70" Height="85" x:Name="NoPhotoRectangle">
                  <Rectangle.BitmapEffect>
                    <DropShadowBitmapEffect ShadowDepth="7" Softness="0.75"/>
                  </Rectangle.BitmapEffect>
                </Rectangle>
              </Border>
              <ContentPresenter Margin="10,0,10,3" HorizontalAlignment="Right" TextBlock.TextAlignment="Right"  />
            </StackPanel>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="HasDropShadow" Value="true">
              <Setter TargetName="Border" Property="CornerRadius" Value="4"/>
              <Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!-- Female node -->
  <ControlTemplate x:Key="FemaleNodeTemplate" TargetType="{x:Type local:DiagramNode}">
    <StackPanel Cursor="Hand" ToolTipService.InitialShowDelay="300" ToolTip="{Binding Path=BottomLabel}">
      <Canvas Name="Person" Width="56.280762" Height="43.714844">
        <Canvas>
          <Canvas>
            <Path Opacity="0.400000" Fill="#ff000000" Data="F1 M 45.587402,19.937012 C 47.937988,18.466797 51.859863,17.262207 54.343262,17.259277 C 56.829590,17.256348 56.937988,18.455566 54.583496,19.925293 C 52.232910,21.400879 48.313965,22.600586 45.827637,22.603516 C 43.343262,22.606445 43.235840,21.412109 45.587402,19.937012 Z"/>
            <Path Opacity="0.400000" Fill="#ff000000" Data="F1 M 26.094238,35.425781 C 26.094238,35.425781 16.417480,41.561523 15.448730,42.169922 C 14.481934,42.775391 15.132324,43.200195 16.057129,43.199219 C 16.974121,43.197266 18.677246,42.769531 19.744629,42.165039 C 20.816895,41.556641 30.785645,35.304688 30.785645,35.304688 L 36.206543,35.298828 C 36.206543,35.298828 42.626465,27.939453 43.489746,27.273438 C 44.348145,26.604492 44.775879,26.847656 44.604004,27.148438 C 44.424316,27.453125 41.319824,31.320313 40.646973,31.807617 C 39.975098,32.291992 41.417480,32.408203 42.525879,32.222656 C 43.635254,32.041992 45.113770,31.436523 45.958496,30.589844 C 46.802246,29.740234 50.750488,25.021484 51.306152,24.415039 C 51.865723,23.806641 51.701660,23.081055 49.960449,23.083984 L 40.348145,23.095703 C 38.608887,23.098633 36.119629,23.826172 34.743652,24.436523 C 33.364746,25.043945 22.260254,29.771484 20.394043,30.622070 C 18.528809,31.470703 18.071777,32.074219 18.600098,32.252930 C 19.126465,32.436523 20.955566,32.316406 21.834473,31.831055 C 22.708496,31.343750 31.947754,27.468750 32.740723,27.163086 C 33.527832,26.861328 34.736816,26.615234 33.468262,27.286133 C 32.196777,27.952148 15.142090,35.324219 15.142090,35.324219 L 20.562012,35.318359 C 20.562012,35.318359 10.591309,41.569336 9.725098,42.177734 C 8.858887,42.781250 9.203613,43.208008 10.124512,43.207031 C 11.044434,43.205078 13.052246,42.776367 14.021973,42.171875 C 14.984863,41.564453 24.868652,35.426758 24.868652,35.426758 L 26.094238,35.425781 Z"/>
          </Canvas>
          <Canvas>
            <Path Name="PersonHead" Fill="{Binding Path=NodeFill}" Stroke="{Binding Path=NodeStroke}" Data="F1 M 8.390137,4.499512 C 8.390137,2.016602 10.405762,0.000000 12.890137,0.000000 C 15.375488,0.000000 17.392090,2.016602 17.392090,4.499512 C 17.392090,6.987793 15.375488,9.003906 12.890137,9.003906 C 10.405762,9.003906 8.390137,6.987793 8.390137,4.499512 Z" />
            <Path Name="PersonBody" Fill="{Binding Path=NodeFill}" Stroke="{Binding Path=NodeStroke}" Data="F1 M 13.606934,30.617188 C 13.606934,30.617188 13.708496,40.949219 13.708496,41.975586 C 13.708496,42.999023 15.041504,43.714844 15.958496,43.714844 C 16.879395,43.714844 17.902832,42.999023 18.007324,41.975586 C 18.107910,40.949219 18.107910,30.412109 18.107910,30.412109 L 23.530762,30.412109 C 23.530762,30.412109 18.210449,18.007324 18.007324,16.878906 C 17.800293,15.752441 18.618652,16.167969 18.926270,16.678711 C 19.233887,17.186523 22.301270,23.711914 22.404785,24.530273 C 22.508301,25.348633 24.143066,25.556641 24.961426,25.246094 C 25.779785,24.940430 26.293457,23.915039 25.779785,22.480469 C 25.270020,21.052246 21.688965,13.092773 21.280762,12.074219 C 20.870605,11.050781 19.541504,9.824707 17.800293,9.824707 L 8.183105,9.824707 C 6.443848,9.824707 5.115723,11.050781 4.706543,12.074219 C 4.297363,13.092773 0.716309,21.052246 0.205566,22.480469 C -0.307129,23.915039 0.205566,24.940430 1.022949,25.246094 C 1.839355,25.556641 3.479980,25.348633 3.581543,24.530273 C 3.681152,23.711914 6.752441,17.186523 7.057129,16.678711 C 7.364746,16.167969 8.183105,15.752441 7.980957,16.878906 C 7.773926,18.007324 2.455566,30.412109 2.455566,30.412109 L 7.878418,30.412109 C 7.878418,30.412109 7.878418,40.949219 7.980957,41.975586 C 8.081543,42.999023 9.106934,43.714844 10.024902,43.714844 C 10.948730,43.714844 12.274902,42.999023 12.274902,41.975586 C 12.274902,40.949219 12.378418,30.617188 12.378418,30.617188 L 13.606934,30.617188 Z" />
          </Canvas>

          <!-- group indicator -->
          <Canvas Name="Group" Visibility="Collapsed" Width="23.768" Height="43.533" Canvas.Left="23.875" Canvas.Top="-29.5">
            <Grid RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="-8.125" Canvas.Top="-1">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="0.25" ScaleY="0.25"/>
                  <SkewTransform AngleX="0" AngleY="0"/>
                  <RotateTransform Angle="0"/>
                  <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Path x:Name="PersonHead_Copy" Fill="{Binding Path=GroupFill}" Data="F1 M 6.535156,4.492188 C 6.535156,2.011719 8.546875,0.000000 11.029297,0.000000 C 13.509766,0.000000 15.521484,2.011719 15.521484,4.492188 C 15.521484,6.974609 13.509766,8.986328 11.029297,8.986328 C 8.546875,8.986328 6.535156,6.974609 6.535156,4.492188 Z" HorizontalAlignment="Left" VerticalAlignment="Top" Width="23.768" Height="8.986"/>
              <Path x:Name="PersonBody_Copy" Fill="{Binding Path=GroupFill}" Data="F1 M 12.050781,25.939453 C 12.050781,25.939453 12.050781,40.164063 12.050781,41.490234 C 12.050781,42.818359 13.990234,43.533203 14.806641,43.533203 C 15.625000,43.533203 17.054688,43.431641 17.054688,41.695313 C 17.054688,39.958984 17.054688,15.521484 17.054688,15.521484 L 18.585938,15.521484 C 18.585938,15.521484 18.585938,23.693359 18.585938,24.917969 C 18.585938,26.144531 19.810547,26.451172 20.525391,26.451172 C 21.240234,26.451172 22.466797,26.349609 22.466797,25.123047 C 22.466797,23.898438 22.160156,16.236328 22.160156,14.195313 C 22.160156,12.152344 20.730469,9.498047 17.257813,9.498047 L 5.207031,9.498047 C 1.736328,9.498047 0.306641,12.152344 0.306641,14.195313 C 0.306641,16.236328 0.000000,23.898438 0.000000,25.123047 C 0.000000,26.349609 1.224609,26.451172 1.939453,26.451172 C 2.654297,26.451172 3.880859,26.144531 3.880859,24.917969 C 3.880859,23.693359 3.880859,15.521484 3.880859,15.521484 L 5.412109,15.521484 C 5.412109,15.521484 5.412109,39.958984 5.412109,41.695313 C 5.412109,43.431641 6.841797,43.533203 7.658203,43.533203 C 8.476563,43.533203 10.416016,42.818359 10.416016,41.490234 C 10.416016,40.164063 10.416016,25.939453 10.416016,25.939453 L 12.050781,25.939453 Z" Margin="0,0.004,0,0" Width="Auto" Height="Auto"/>
            </Grid>
            <Grid RenderTransformOrigin="0.5,0.5" Canvas.Left="1.5" Canvas.Top="-1">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="0.25" ScaleY="0.25"/>
                  <SkewTransform AngleX="0" AngleY="0"/>
                  <RotateTransform Angle="0"/>
                  <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Path x:Name="PersonHead_Copy1" Fill="{Binding Path=GroupFill}" Data="F1 M 6.535156,4.492188 C 6.535156,2.011719 8.546875,0.000000 11.029297,0.000000 C 13.509766,0.000000 15.521484,2.011719 15.521484,4.492188 C 15.521484,6.974609 13.509766,8.986328 11.029297,8.986328 C 8.546875,8.986328 6.535156,6.974609 6.535156,4.492188 Z" HorizontalAlignment="Left" VerticalAlignment="Top" Width="23.768" Height="8.986"/>
              <Path x:Name="PersonBody_Copy1" Fill="{Binding Path=GroupFill}" Data="F1 M 12.050781,25.939453 C 12.050781,25.939453 12.050781,40.164063 12.050781,41.490234 C 12.050781,42.818359 13.990234,43.533203 14.806641,43.533203 C 15.625000,43.533203 17.054688,43.431641 17.054688,41.695313 C 17.054688,39.958984 17.054688,15.521484 17.054688,15.521484 L 18.585938,15.521484 C 18.585938,15.521484 18.585938,23.693359 18.585938,24.917969 C 18.585938,26.144531 19.810547,26.451172 20.525391,26.451172 C 21.240234,26.451172 22.466797,26.349609 22.466797,25.123047 C 22.466797,23.898438 22.160156,16.236328 22.160156,14.195313 C 22.160156,12.152344 20.730469,9.498047 17.257813,9.498047 L 5.207031,9.498047 C 1.736328,9.498047 0.306641,12.152344 0.306641,14.195313 C 0.306641,16.236328 0.000000,23.898438 0.000000,25.123047 C 0.000000,26.349609 1.224609,26.451172 1.939453,26.451172 C 2.654297,26.451172 3.880859,26.144531 3.880859,24.917969 C 3.880859,23.693359 3.880859,15.521484 3.880859,15.521484 L 5.412109,15.521484 C 5.412109,15.521484 5.412109,39.958984 5.412109,41.695313 C 5.412109,43.431641 6.841797,43.533203 7.658203,43.533203 C 8.476563,43.533203 10.416016,42.818359 10.416016,41.490234 C 10.416016,40.164063 10.416016,25.939453 10.416016,25.939453 L 12.050781,25.939453 Z" Margin="0,0.004,0,0" Width="Auto" Height="Auto"/>
            </Grid>
            <Grid RenderTransformOrigin="0.5,0.5" Canvas.Left="-3.125" Canvas.Top="7.25">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="0.25" ScaleY="0.25"/>
                  <SkewTransform AngleX="0" AngleY="0"/>
                  <RotateTransform Angle="0"/>
                  <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Path x:Name="PersonHead_Copy2" Fill="{Binding Path=GroupFill}" Data="F1 M 6.535156,4.492188 C 6.535156,2.011719 8.546875,0.000000 11.029297,0.000000 C 13.509766,0.000000 15.521484,2.011719 15.521484,4.492188 C 15.521484,6.974609 13.509766,8.986328 11.029297,8.986328 C 8.546875,8.986328 6.535156,6.974609 6.535156,4.492188 Z" HorizontalAlignment="Left" VerticalAlignment="Top" Width="23.768" Height="8.986"/>
              <Path x:Name="PersonBody_Copy2" Fill="{Binding Path=GroupFill}" Data="F1 M 12.050781,25.939453 C 12.050781,25.939453 12.050781,40.164063 12.050781,41.490234 C 12.050781,42.818359 13.990234,43.533203 14.806641,43.533203 C 15.625000,43.533203 17.054688,43.431641 17.054688,41.695313 C 17.054688,39.958984 17.054688,15.521484 17.054688,15.521484 L 18.585938,15.521484 C 18.585938,15.521484 18.585938,23.693359 18.585938,24.917969 C 18.585938,26.144531 19.810547,26.451172 20.525391,26.451172 C 21.240234,26.451172 22.466797,26.349609 22.466797,25.123047 C 22.466797,23.898438 22.160156,16.236328 22.160156,14.195313 C 22.160156,12.152344 20.730469,9.498047 17.257813,9.498047 L 5.207031,9.498047 C 1.736328,9.498047 0.306641,12.152344 0.306641,14.195313 C 0.306641,16.236328 0.000000,23.898438 0.000000,25.123047 C 0.000000,26.349609 1.224609,26.451172 1.939453,26.451172 C 2.654297,26.451172 3.880859,26.144531 3.880859,24.917969 C 3.880859,23.693359 3.880859,15.521484 3.880859,15.521484 L 5.412109,15.521484 C 5.412109,15.521484 5.412109,39.958984 5.412109,41.695313 C 5.412109,43.431641 6.841797,43.533203 7.658203,43.533203 C 8.476563,43.533203 10.416016,42.818359 10.416016,41.490234 C 10.416016,40.164063 10.416016,25.939453 10.416016,25.939453 L 12.050781,25.939453 Z" Margin="0,0.004,0,0" Width="Auto" Height="Auto"/>
            </Grid>
            <Ellipse Stroke="{Binding Path=GroupStroke}" RenderTransformOrigin="0.5,0.5" Fill="{x:Null}" Width="49.845" Height="49.845" Canvas.Left="-36.375" Canvas.Top="16.625">
              <Ellipse.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="1" ScaleY="1"/>
                  <SkewTransform AngleX="0" AngleY="0"/>
                  <RotateTransform Angle="-41.157"/>
                  <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
              </Ellipse.RenderTransform>
            </Ellipse>
          </Canvas>
          <!-- / group indicator -->

        </Canvas>
      </Canvas>
      <Label Content="{Binding Path=BottomLabel}" Padding="0,5,0,0" HorizontalAlignment="Left" TextBlock.TextAlignment="Right" Foreground="White" FontSize="9"></Label>
    </StackPanel>
    <ControlTemplate.Triggers>
      <!-- mouse over -->
      <Trigger Property="IsMouseOver" Value="true">
        <Setter Property="Fill" Value="{Binding Path=NodeHoverFill}" TargetName="PersonHead"/>
        <Setter Property="Fill" Value="{Binding Path=NodeHoverFill}" TargetName="PersonBody"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>

  <!-- Male node -->
  <ControlTemplate x:Key="MaleNodeTemplate" TargetType="{x:Type local:DiagramNode}">
    <StackPanel Cursor="Hand" ToolTipService.InitialShowDelay="300" ToolTip="{Binding Path=BottomLabel}">
      <Canvas Name="Person" Width="54.767578" Height="43.533203">
        <Canvas>
          <Canvas>
            <Path Opacity="0.400000" Fill="#ff000000" Data="F1 M 44.000977,20.005859 C 46.424805,18.527344 50.398438,17.246094 52.878906,17.143555 C 55.357422,17.041016 55.402344,18.157227 52.981445,19.635742 C 50.557617,21.111328 46.583984,22.395508 44.103516,22.497070 C 41.625000,22.599609 41.579102,21.481445 44.000977,20.005859 Z"/>
            <Path Opacity="0.400000" Fill="#ff000000" Data="F1 M 28.572266,32.551758 C 28.572266,32.551758 14.687012,41.024414 13.390137,41.814453 C 12.093262,42.605469 13.334961,42.951172 14.150879,42.916992 C 14.968750,42.883789 16.496094,42.765625 18.191406,41.730469 C 19.886719,40.697266 43.744141,26.140625 43.744141,26.140625 L 45.273438,26.077148 C 45.273438,26.077148 37.294922,30.945313 36.099609,31.673828 C 34.904297,32.406250 35.828125,32.536133 36.541992,32.506836 C 37.255859,32.476563 38.581055,32.367188 39.779297,31.636719 C 40.974609,30.907227 48.146484,26.358398 50.140625,25.139648 C 52.135742,23.923828 53.298828,22.401367 49.831055,22.544922 L 37.791016,23.041016 C 34.320313,23.183594 30.300781,24.823242 28.306641,26.039063 C 26.311523,27.256836 18.526367,31.832031 17.330566,32.560547 C 16.133301,33.291992 17.257324,33.299805 17.971680,33.271484 C 18.686035,33.242188 20.210938,33.010742 21.406738,32.280273 C 22.602051,31.549805 30.580078,26.682617 30.580078,26.682617 L 32.110352,26.620117 C 32.110352,26.620117 8.253906,41.175781 6.558594,42.209961 C 4.863281,43.245117 6.192383,43.245117 7.008301,43.211914 C 7.826172,43.177734 10.461914,42.671875 11.758301,41.882813 C 13.053223,41.091797 26.938965,32.619141 26.938965,32.619141 L 28.572266,32.551758 Z"/>
          </Canvas>
          <Canvas>
            <Path Name="PersonHead" Fill="{Binding Path=NodeFill}" Stroke="{Binding Path=NodeStroke}" Data="F1 M 6.535156,4.492188 C 6.535156,2.011719 8.546875,0.000000 11.029297,0.000000 C 13.509766,0.000000 15.521484,2.011719 15.521484,4.492188 C 15.521484,6.974609 13.509766,8.986328 11.029297,8.986328 C 8.546875,8.986328 6.535156,6.974609 6.535156,4.492188 Z" />
            <Path Name="PersonBody" Fill="{Binding Path=NodeFill}" Stroke="{Binding Path=NodeStroke}" Data="F1 M 12.050781,25.939453 C 12.050781,25.939453 12.050781,40.164063 12.050781,41.490234 C 12.050781,42.818359 13.990234,43.533203 14.806641,43.533203 C 15.625000,43.533203 17.054688,43.431641 17.054688,41.695313 C 17.054688,39.958984 17.054688,15.521484 17.054688,15.521484 L 18.585938,15.521484 C 18.585938,15.521484 18.585938,23.693359 18.585938,24.917969 C 18.585938,26.144531 19.810547,26.451172 20.525391,26.451172 C 21.240234,26.451172 22.466797,26.349609 22.466797,25.123047 C 22.466797,23.898438 22.160156,16.236328 22.160156,14.195313 C 22.160156,12.152344 20.730469,9.498047 17.257813,9.498047 L 5.207031,9.498047 C 1.736328,9.498047 0.306641,12.152344 0.306641,14.195313 C 0.306641,16.236328 0.000000,23.898438 0.000000,25.123047 C 0.000000,26.349609 1.224609,26.451172 1.939453,26.451172 C 2.654297,26.451172 3.880859,26.144531 3.880859,24.917969 C 3.880859,23.693359 3.880859,15.521484 3.880859,15.521484 L 5.412109,15.521484 C 5.412109,15.521484 5.412109,39.958984 5.412109,41.695313 C 5.412109,43.431641 6.841797,43.533203 7.658203,43.533203 C 8.476563,43.533203 10.416016,42.818359 10.416016,41.490234 C 10.416016,40.164063 10.416016,25.939453 10.416016,25.939453 L 12.050781,25.939453 Z" />
          </Canvas>

          <!-- group indicator -->
          <Canvas Name="Group" Visibility="Collapsed"  Width="23.768" Height="43.533" Canvas.Left="22.375" Canvas.Top="-29.5">
            <Grid RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" VerticalAlignment="Top" Canvas.Left="-8.125" Canvas.Top="-1">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="0.25" ScaleY="0.25"/>
                  <SkewTransform AngleX="0" AngleY="0"/>
                  <RotateTransform Angle="0"/>
                  <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Path x:Name="PersonHead_Copy" Fill="{Binding Path=GroupFill}" Data="F1 M 6.535156,4.492188 C 6.535156,2.011719 8.546875,0.000000 11.029297,0.000000 C 13.509766,0.000000 15.521484,2.011719 15.521484,4.492188 C 15.521484,6.974609 13.509766,8.986328 11.029297,8.986328 C 8.546875,8.986328 6.535156,6.974609 6.535156,4.492188 Z" HorizontalAlignment="Left" VerticalAlignment="Top" Width="23.768" Height="8.986"/>
              <Path x:Name="PersonBody_Copy" Fill="{Binding Path=GroupFill}" Data="F1 M 12.050781,25.939453 C 12.050781,25.939453 12.050781,40.164063 12.050781,41.490234 C 12.050781,42.818359 13.990234,43.533203 14.806641,43.533203 C 15.625000,43.533203 17.054688,43.431641 17.054688,41.695313 C 17.054688,39.958984 17.054688,15.521484 17.054688,15.521484 L 18.585938,15.521484 C 18.585938,15.521484 18.585938,23.693359 18.585938,24.917969 C 18.585938,26.144531 19.810547,26.451172 20.525391,26.451172 C 21.240234,26.451172 22.466797,26.349609 22.466797,25.123047 C 22.466797,23.898438 22.160156,16.236328 22.160156,14.195313 C 22.160156,12.152344 20.730469,9.498047 17.257813,9.498047 L 5.207031,9.498047 C 1.736328,9.498047 0.306641,12.152344 0.306641,14.195313 C 0.306641,16.236328 0.000000,23.898438 0.000000,25.123047 C 0.000000,26.349609 1.224609,26.451172 1.939453,26.451172 C 2.654297,26.451172 3.880859,26.144531 3.880859,24.917969 C 3.880859,23.693359 3.880859,15.521484 3.880859,15.521484 L 5.412109,15.521484 C 5.412109,15.521484 5.412109,39.958984 5.412109,41.695313 C 5.412109,43.431641 6.841797,43.533203 7.658203,43.533203 C 8.476563,43.533203 10.416016,42.818359 10.416016,41.490234 C 10.416016,40.164063 10.416016,25.939453 10.416016,25.939453 L 12.050781,25.939453 Z" Margin="0,0.004,0,0" Width="Auto" Height="Auto"/>
            </Grid>
            <Grid RenderTransformOrigin="0.5,0.5" Canvas.Left="1.5" Canvas.Top="-1">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="0.25" ScaleY="0.25"/>
                  <SkewTransform AngleX="0" AngleY="0"/>
                  <RotateTransform Angle="0"/>
                  <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Path x:Name="PersonHead_Copy1" Fill="{Binding Path=GroupFill}" Data="F1 M 6.535156,4.492188 C 6.535156,2.011719 8.546875,0.000000 11.029297,0.000000 C 13.509766,0.000000 15.521484,2.011719 15.521484,4.492188 C 15.521484,6.974609 13.509766,8.986328 11.029297,8.986328 C 8.546875,8.986328 6.535156,6.974609 6.535156,4.492188 Z" HorizontalAlignment="Left" VerticalAlignment="Top" Width="23.768" Height="8.986"/>
              <Path x:Name="PersonBody_Copy1" Fill="{Binding Path=GroupFill}" Data="F1 M 12.050781,25.939453 C 12.050781,25.939453 12.050781,40.164063 12.050781,41.490234 C 12.050781,42.818359 13.990234,43.533203 14.806641,43.533203 C 15.625000,43.533203 17.054688,43.431641 17.054688,41.695313 C 17.054688,39.958984 17.054688,15.521484 17.054688,15.521484 L 18.585938,15.521484 C 18.585938,15.521484 18.585938,23.693359 18.585938,24.917969 C 18.585938,26.144531 19.810547,26.451172 20.525391,26.451172 C 21.240234,26.451172 22.466797,26.349609 22.466797,25.123047 C 22.466797,23.898438 22.160156,16.236328 22.160156,14.195313 C 22.160156,12.152344 20.730469,9.498047 17.257813,9.498047 L 5.207031,9.498047 C 1.736328,9.498047 0.306641,12.152344 0.306641,14.195313 C 0.306641,16.236328 0.000000,23.898438 0.000000,25.123047 C 0.000000,26.349609 1.224609,26.451172 1.939453,26.451172 C 2.654297,26.451172 3.880859,26.144531 3.880859,24.917969 C 3.880859,23.693359 3.880859,15.521484 3.880859,15.521484 L 5.412109,15.521484 C 5.412109,15.521484 5.412109,39.958984 5.412109,41.695313 C 5.412109,43.431641 6.841797,43.533203 7.658203,43.533203 C 8.476563,43.533203 10.416016,42.818359 10.416016,41.490234 C 10.416016,40.164063 10.416016,25.939453 10.416016,25.939453 L 12.050781,25.939453 Z" Margin="0,0.004,0,0" Width="Auto" Height="Auto"/>
            </Grid>
            <Grid RenderTransformOrigin="0.5,0.5" Canvas.Left="-3.125" Canvas.Top="7.25">
              <Grid.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="0.25" ScaleY="0.25"/>
                  <SkewTransform AngleX="0" AngleY="0"/>
                  <RotateTransform Angle="0"/>
                  <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
              </Grid.RenderTransform>
              <Path x:Name="PersonHead_Copy2" Fill="{Binding Path=GroupFill}" Data="F1 M 6.535156,4.492188 C 6.535156,2.011719 8.546875,0.000000 11.029297,0.000000 C 13.509766,0.000000 15.521484,2.011719 15.521484,4.492188 C 15.521484,6.974609 13.509766,8.986328 11.029297,8.986328 C 8.546875,8.986328 6.535156,6.974609 6.535156,4.492188 Z" HorizontalAlignment="Left" VerticalAlignment="Top" Width="23.768" Height="8.986"/>
              <Path x:Name="PersonBody_Copy2" Fill="{Binding Path=GroupFill}" Data="F1 M 12.050781,25.939453 C 12.050781,25.939453 12.050781,40.164063 12.050781,41.490234 C 12.050781,42.818359 13.990234,43.533203 14.806641,43.533203 C 15.625000,43.533203 17.054688,43.431641 17.054688,41.695313 C 17.054688,39.958984 17.054688,15.521484 17.054688,15.521484 L 18.585938,15.521484 C 18.585938,15.521484 18.585938,23.693359 18.585938,24.917969 C 18.585938,26.144531 19.810547,26.451172 20.525391,26.451172 C 21.240234,26.451172 22.466797,26.349609 22.466797,25.123047 C 22.466797,23.898438 22.160156,16.236328 22.160156,14.195313 C 22.160156,12.152344 20.730469,9.498047 17.257813,9.498047 L 5.207031,9.498047 C 1.736328,9.498047 0.306641,12.152344 0.306641,14.195313 C 0.306641,16.236328 0.000000,23.898438 0.000000,25.123047 C 0.000000,26.349609 1.224609,26.451172 1.939453,26.451172 C 2.654297,26.451172 3.880859,26.144531 3.880859,24.917969 C 3.880859,23.693359 3.880859,15.521484 3.880859,15.521484 L 5.412109,15.521484 C 5.412109,15.521484 5.412109,39.958984 5.412109,41.695313 C 5.412109,43.431641 6.841797,43.533203 7.658203,43.533203 C 8.476563,43.533203 10.416016,42.818359 10.416016,41.490234 C 10.416016,40.164063 10.416016,25.939453 10.416016,25.939453 L 12.050781,25.939453 Z" Margin="0,0.004,0,0" Width="Auto" Height="Auto"/>
            </Grid>
            <Ellipse RenderTransformOrigin="0.5,0.5" Stroke="{Binding Path=GroupStroke}" Fill="{x:Null}" Width="49.845" Height="49.845" Canvas.Left="-36.375" Canvas.Top="16.625">
              <Ellipse.RenderTransform>
                <TransformGroup>
                  <ScaleTransform ScaleX="1" ScaleY="1"/>
                  <SkewTransform AngleX="0" AngleY="0"/>
                  <RotateTransform Angle="-41.157"/>
                  <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
              </Ellipse.RenderTransform>
            </Ellipse>
          </Canvas>
          <!-- / group indicator -->

        </Canvas>
      </Canvas>
      <Label Padding="0,5,0,0" Content="{Binding Path=BottomLabel}" HorizontalAlignment="Left" TextBlock.TextAlignment="Right" Foreground="White" FontSize="9"></Label>
    </StackPanel>
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="true">
        <Setter Property="Fill" Value="{Binding Path=NodeHoverFill}" TargetName="PersonHead"/>
        <Setter Property="Fill" Value="{Binding Path=NodeHoverFill}" TargetName="PersonBody"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>

  <!-- Female primary node -->
  <ControlTemplate x:Key="FemalePrimaryNodeTemplate" TargetType="{x:Type local:DiagramNode}">
    <StackPanel ToolTipService.InitialShowDelay="300" ToolTip="{Binding Path=BottomLabel}">
      <Canvas Name="Person" Width="79.238281" Height="80.424805">
        <Canvas>
          <Canvas>
            <Path Opacity="0.400000" Fill="#ff000000" Data="F1 M 68.544922,41.992188 C 70.895508,40.522461 74.817383,39.317871 77.300781,39.314941 C 79.787109,39.312012 79.895508,40.511719 77.541016,41.980469 C 75.190430,43.457031 71.271484,44.656250 68.785156,44.659180 C 66.300781,44.662109 66.193359,43.467773 68.544922,41.992188 Z"/>
            <Path Opacity="0.400000" Fill="#ff000000" Data="F1 M 49.051758,57.481445 C 49.051758,57.481445 39.375000,63.617188 38.406250,64.225586 C 37.439453,64.831055 38.089844,65.255859 39.014648,65.254883 C 39.931641,65.252930 41.634766,64.825195 42.702148,64.220703 C 43.774414,63.612305 53.743164,57.360352 53.743164,57.360352 L 59.164063,57.354492 C 59.164063,57.354492 65.583984,49.995117 66.447266,49.329102 C 67.305664,48.660156 67.733398,48.903320 67.561523,49.204102 C 67.381836,49.508789 64.277344,53.375977 63.604492,53.863281 C 62.932617,54.347656 64.375000,54.463867 65.483398,54.278320 C 66.592773,54.097656 68.071289,53.492188 68.916016,52.645508 C 69.759766,51.795898 73.708008,47.077148 74.263672,46.470703 C 74.823242,45.862305 74.659180,45.136719 72.917969,45.139648 L 63.305664,45.151367 C 61.566406,45.154297 59.077148,45.881836 57.701172,46.492188 C 56.322266,47.099609 45.217773,51.827148 43.351563,52.677734 C 41.486328,53.526367 41.029297,54.129883 41.557617,54.308594 C 42.083984,54.492188 43.913086,54.372070 44.791992,53.886719 C 45.666016,53.399414 54.905273,49.524414 55.698242,49.218750 C 56.485352,48.916992 57.694336,48.670898 56.425781,49.341797 C 55.154297,50.007813 38.099609,57.379883 38.099609,57.379883 L 43.519531,57.374023 C 43.519531,57.374023 33.548828,63.625000 32.682617,64.233398 C 31.816406,64.836914 32.161133,65.263672 33.082031,65.262695 C 34.001953,65.260742 36.009766,64.832031 36.979492,64.227539 C 37.942383,63.620117 47.826172,57.482422 47.826172,57.482422 L 49.051758,57.481445 Z"/>
          </Canvas>
          <Canvas>
            <Path Name="PersonHead" Fill="{Binding Path=NodeFill}" Stroke="{Binding Path=NodeStroke}" Data="F1 M 31.347656,26.555176 C 31.347656,24.072266 33.363281,22.055664 35.847656,22.055664 C 38.333008,22.055664 40.349609,24.072266 40.349609,26.555176 C 40.349609,29.043457 38.333008,31.059570 35.847656,31.059570 C 33.363281,31.059570 31.347656,29.043457 31.347656,26.555176 Z"/>
            <Path Name="PersonBody" Fill="{Binding Path=NodeFill}" Stroke="{Binding Path=NodeStroke}" Data="F1 M 36.564453,52.672852 C 36.564453,52.672852 36.666016,63.004883 36.666016,64.031250 C 36.666016,65.054688 37.999023,65.770508 38.916016,65.770508 C 39.836914,65.770508 40.860352,65.054688 40.964844,64.031250 C 41.065430,63.004883 41.065430,52.467773 41.065430,52.467773 L 46.488281,52.467773 C 46.488281,52.467773 41.167969,40.062988 40.964844,38.934570 C 40.757813,37.808105 41.576172,38.223633 41.883789,38.734375 C 42.191406,39.242188 45.258789,45.767578 45.362305,46.585938 C 45.465820,47.404297 47.100586,47.612305 47.918945,47.301758 C 48.737305,46.996094 49.250977,45.970703 48.737305,44.536133 C 48.227539,43.107422 44.646484,35.148438 44.238281,34.129883 C 43.828125,33.106445 42.499023,31.880371 40.757813,31.880371 L 31.140625,31.880371 C 29.401367,31.880371 28.073242,33.106445 27.664063,34.129883 C 27.254883,35.148438 23.673828,43.107422 23.163086,44.536133 C 22.650391,45.970703 23.163086,46.996094 23.980469,47.301758 C 24.796875,47.612305 26.437500,47.404297 26.539063,46.585938 C 26.638672,45.767578 29.709961,39.242188 30.014648,38.734375 C 30.322266,38.223633 31.140625,37.808105 30.938477,38.934570 C 30.731445,40.062988 25.413086,52.467773 25.413086,52.467773 L 30.835938,52.467773 C 30.835938,52.467773 30.835938,63.004883 30.938477,64.031250 C 31.039063,65.054688 32.064453,65.770508 32.982422,65.770508 C 33.906250,65.770508 35.232422,65.054688 35.232422,64.031250 C 35.232422,63.004883 35.335938,52.672852 35.335938,52.672852 L 36.564453,52.672852 Z"/>
          </Canvas>
          <Path StrokeThickness="3.000000" Stroke="#ffbfbfbf" StrokeMiterLimit="1.000000" Data="F1 M 70.177734,44.585938 C 70.177734,63.550781 54.804688,78.924805 35.838867,78.924805 C 16.873535,78.924805 1.500000,63.550781 1.500000,44.585938 C 1.500000,25.621094 16.873535,10.247070 35.838867,10.247070 C 54.804688,10.247070 70.177734,25.621094 70.177734,44.585938 Z"/>
          <Path StrokeThickness="1.500000" Stroke="#ffffffff" StrokeMiterLimit="1.000000" Fill="#ff3952a3" Data="F1 M 35.882813,1.694336 L 38.417480,6.830078 L 44.084961,7.654297 L 39.984863,11.654297 L 40.952148,17.299805 L 35.882813,14.630859 L 30.812500,17.299805 L 31.780273,11.654297 L 27.677734,7.654297 L 33.347656,6.830078 L 35.882813,1.694336 Z"/>
        </Canvas>
      </Canvas>
      <Label Content="{Binding Path=BottomLabel}" Padding="0,5,0,0" HorizontalAlignment="Center" TextBlock.TextAlignment="Right" Foreground="White" FontSize="9"></Label>
    </StackPanel>
    <!-- Mouse over -->
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="true">
        <Setter Property="Fill" Value="{Binding Path=NodeHoverFill}" TargetName="PersonHead"/>
        <Setter Property="Fill" Value="{Binding Path=NodeHoverFill}" TargetName="PersonBody"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>

  <!-- Male primary node -->
  <ControlTemplate x:Key="MalePrimaryNodeTemplate" TargetType="{x:Type local:DiagramNode}">
    <StackPanel ToolTipService.InitialShowDelay="300" ToolTip="{Binding Path=BottomLabel}">
      <Canvas Name="Person" Width="80.338867" Height="80.424805">
        <Canvas>
          <Canvas>
            <Path Opacity="0.400000" Fill="#ff000000" Data="F1 M 69.572266,42.657227 C 71.996094,41.178711 75.968750,39.897461 78.449219,39.794922 C 80.927734,39.692383 80.973633,40.808594 78.552734,42.287109 C 76.128906,43.762695 72.154297,45.046875 69.673828,45.148438 C 67.195313,45.250977 67.150391,44.132813 69.572266,42.657227 Z"/>
            <Path Opacity="0.400000" Fill="#ff000000" Data="F1 M 54.142578,55.203125 C 54.142578,55.203125 40.257813,63.675781 38.960938,64.465820 C 37.664063,65.256836 38.905762,65.602539 39.721680,65.568359 C 40.539551,65.535156 42.066406,65.416992 43.761719,64.381836 C 45.457031,63.348633 69.314453,48.791992 69.314453,48.791992 L 70.843750,48.728516 C 70.843750,48.728516 62.865234,53.596680 61.669922,54.325195 C 60.474609,55.057617 61.398438,55.187500 62.113281,55.158203 C 62.827148,55.127930 64.152344,55.018555 65.349609,54.288086 C 66.544922,53.558594 73.716797,49.009766 75.711914,47.791016 C 77.707031,46.575195 78.869141,45.052734 75.402344,45.196289 L 63.361328,45.692383 C 59.891602,45.834961 55.871094,47.474609 53.876953,48.690430 C 51.882813,49.908203 44.097656,54.483398 42.901367,55.211914 C 41.704102,55.943359 42.828125,55.951172 43.542969,55.922852 C 44.256836,55.893555 45.781250,55.662109 46.977539,54.931641 C 48.172852,54.201172 56.151367,49.333984 56.151367,49.333984 L 57.681641,49.271484 C 57.681641,49.271484 33.824707,63.827148 32.129395,64.861328 C 30.434082,65.896484 31.763184,65.896484 32.579102,65.863281 C 33.396973,65.829102 36.032715,65.323242 37.329102,64.534180 C 38.624023,63.743164 52.509766,55.270508 52.509766,55.270508 L 54.142578,55.203125 Z"/>
          </Canvas>
          <Path Name="PersonHead" Fill="{Binding Path=NodeFill}" Stroke="{Binding Path=NodeStroke}" Data="F1 M 31.438965,26.809570 C 31.438965,24.329102 33.450684,22.317383 35.933105,22.317383 C 38.413574,22.317383 40.425293,24.329102 40.425293,26.809570 C 40.425293,29.291992 38.413574,31.303711 35.933105,31.303711 C 33.450684,31.303711 31.438965,29.291992 31.438965,26.809570 Z"/>
          <Path Name="PersonBody" Fill="{Binding Path=NodeFill}" Stroke="{Binding Path=NodeStroke}" Data="F1 M 36.637695,48.698242 C 36.637695,48.698242 36.637695,62.922852 36.637695,64.249023 C 36.637695,65.577148 38.577148,66.291992 39.393555,66.291992 C 40.211914,66.291992 41.641602,66.190430 41.641602,64.454102 C 41.641602,62.717773 41.641602,38.280273 41.641602,38.280273 L 43.172852,38.280273 C 43.172852,38.280273 43.172852,46.452148 43.172852,47.676758 C 43.172852,48.903320 44.397461,49.209961 45.112305,49.209961 C 45.827148,49.209961 47.053711,49.108398 47.053711,47.881836 C 47.053711,46.657227 46.747070,38.995117 46.747070,36.954102 C 46.747070,34.911133 45.317383,32.256836 41.844727,32.256836 L 29.793945,32.256836 C 26.323242,32.256836 24.893555,34.911133 24.893555,36.954102 C 24.893555,38.995117 24.586914,46.657227 24.586914,47.881836 C 24.586914,49.108398 25.811523,49.209961 26.526367,49.209961 C 27.241211,49.209961 28.467773,48.903320 28.467773,47.676758 C 28.467773,46.452148 28.467773,38.280273 28.467773,38.280273 L 29.999023,38.280273 C 29.999023,38.280273 29.999023,62.717773 29.999023,64.454102 C 29.999023,66.190430 31.428711,66.291992 32.245117,66.291992 C 33.063477,66.291992 35.002930,65.577148 35.002930,64.249023 C 35.002930,62.922852 35.002930,48.698242 35.002930,48.698242 L 36.637695,48.698242 Z"/>
          <Path StrokeThickness="3.000000" Stroke="#ffbfbfbf" StrokeMiterLimit="1.000000" Data="F1 M 70.177734,44.585938 C 70.177734,63.550781 54.804688,78.924805 35.838867,78.924805 C 16.873535,78.924805 1.500000,63.550781 1.500000,44.585938 C 1.500000,25.621094 16.873535,10.247070 35.838867,10.247070 C 54.804688,10.247070 70.177734,25.621094 70.177734,44.585938 Z"/>
          <Path StrokeThickness="1.500000" Stroke="#ffffffff" StrokeMiterLimit="1.000000" Fill="#ff3952a3" Data="F1 M 35.882813,1.694336 L 38.417480,6.830078 L 44.084961,7.654297 L 39.984863,11.654297 L 40.952637,17.299805 L 35.882813,14.630859 L 30.812500,17.299805 L 31.780273,11.654297 L 27.677734,7.654297 L 33.347656,6.830078 L 35.882813,1.694336 Z"/>
        </Canvas>
      </Canvas>
      <Label Content="{Binding Path=BottomLabel}" Padding="0,5,0,0" HorizontalAlignment="Center" TextBlock.TextAlignment="Right" Foreground="White" FontSize="9"></Label>
    </StackPanel>
    <!-- Mouse over -->
    <ControlTemplate.Triggers>
      <Trigger Property="IsMouseOver" Value="true">
        <Setter Property="Fill" Value="{Binding Path=NodeHoverFill}" TargetName="PersonHead"/>
        <Setter Property="Fill" Value="{Binding Path=NodeHoverFill}" TargetName="PersonBody"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>

</ResourceDictionary>